﻿using System;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Generic;

using PowerSys.Model;
using PowerSys.BusinessLogic;
using PowerSys.SystemFramework;
using PowerSys.SystemFramework.ConfigurationManagment;

namespace PowerSys.PowerSite.Admin
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //XConfiguration xc = new XConfiguration(ConfigType.WebConfig);
            //xc.SetAppSetting("LogFile", "abcd");
            //xc.SetAppSetting("LogFile1", "abcdd");
            //xc.RemoveAppSetting("LogFile");
            //xc.Save();

            //Response.Write(XConfigHelper.GetSectionConfig("PowerSys", "Site", "SiteName"));
            
            //Response.Write(new XUser().Login());
            
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            //X_User x_User = new X_User();
            //x_User.Password = "123456x";
            //x_User.UserCode = "999999";
            //x_User.LoginName = "King" + DateTime.Now.ToString("ss fff");
            //x_User.Email = "tao@dabao.com";
            //x_User.Status = 1;

            //new XUser().Add(x_User);

            //x_User = new X_User();
            //x_User.ID = "00000000";
            //x_User.LoginName = "陶剑扬" + DateTime.Now.ToString("ss fff");

            //new XUser().Update(x_User);

            //Response.Write(x_User.ID);

            Response.Write(DateTime.Now.ToString("hh:mm:ss fff") + "<br />");
            Response.Write(new XUser().Login(TextBox1.Text).ToString() + "<br />");
            Response.Write(DateTime.Now.ToString("hh:mm:ss fff"));
        }
    }
}